package com.armed.ejb.entities;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 * Class Telefonos
 *
 *
 * @author init() software
 * @version 08/02/2008 
 */
@Entity
@Table(name = "TELEFONOS")
@NamedQueries({@NamedQuery(name = "Telefonos.findByTipoTelefono", query = "SELECT t FROM Telefonos t WHERE t.tipoTelefono = :tipoTelefono"), @NamedQuery(name = "Telefonos.findByCaracteristica", query = "SELECT t FROM Telefonos t WHERE t.caracteristica = :caracteristica"), @NamedQuery(name = "Telefonos.findByNumeroTelefono", query = "SELECT t FROM Telefonos t WHERE t.numeroTelefono = :numeroTelefono")})
public class Telefonos implements Serializable 
{
    private static final long serialVersionUID = 1L;
    @Id @GeneratedValue(strategy=GenerationType.AUTO)
    @Column(name = "ID_TELEFONO", nullable = false)
    private String id;
    @Column(name = "CARACTERISTICA", nullable = false)
    private String caracteristica;
    @Column(name = "NUMERO_TELEFONO", nullable = false)
    private String numeroTelefono;
    @Column(name = "TIPO_TELEFONO")
    private String tipoTelefono;
    /** Constructor of Telefonos */
    public Telefonos()
    {
    }

    public Telefonos(String id)
    {
        this.id = id;
    }

    public String getTipoTelefono()
    {
        return tipoTelefono;
    }

    public void setTipoTelefono(String tipoTelefono)
    {
        this.tipoTelefono = tipoTelefono;
    }

    @Override
    public int hashCode()
    {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object)
    {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Telefonos))
        {
            return false;
        }
        Telefonos other = (Telefonos) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)))
        {
            return false;
        }
        return true;
    }

    @Override
    public String toString()
    {
        return "com.armed.ejb.entities.Telefonos[id=" + id + "]";
    }

    public String getId()
    {
        return id;
    }

    public void setId(String id)
    {
        this.id = id;
    }

    public String getCaracteristica()
    {
        return caracteristica;
    }

    public void setCaracteristica(String caracteristica)
    {
        this.caracteristica = caracteristica;
    }

    public String getNumeroTelefono()
    {
        return numeroTelefono;
    }

    public void setNumeroTelefono(String numeroTelefono)
    {
        this.numeroTelefono = numeroTelefono;
    }
}
